<template>
  <ul>
      <li v-for="(item,index) in listData" :key='index'>
          <p>{{item.name}}</p>
          <DgComponent v-if="item.children" :listData="item.children"/>
      </li>
  </ul>
</template>

<script>
export default {
	name:'DgComponent',
    props:['listData'],
    mounted(){
        console.log(this.listData)
    }

}
</script>

<style>

</style>